//
// Created by ZYZ on 2020/6/17.
//

#ifndef TESTALGORITHM_TYPE_LINKED_QUEUE_H
#define TESTALGORITHM_TYPE_LINKED_QUEUE_H

#include "define.h"
#include "type_binary_tree.h"

#define MAXSIZE 20       //最多容纳19个元素，front之前的一个空间空出来

//ーーーー-单链队列一队列的链式存储结构
#ifdef SELEMTYPE_CHAR
typedef char QElemType;
#elif SELEMTYPE_BI_TREE
typedef BiTree QElemType;
#endif

typedef struct QNode {
    QElemType data;
    struct QNode *next;
} QNode, *QueuePtr;

typedef struct LinkQueue{
    QueuePtr front;     //队头指针
    QueuePtr rear;      //队尾指针
} LinkQueue;

#endif //TESTALGORITHM_TYPE_LINKED_QUEUE_H
